package com.huilian.iotbox.data.dto;

import com.huilian.iotbox.data.enums.ConsumeRecordTypeEnum;
import com.huilian.iotbox.data.po.StatsDevice;
import com.huilian.iotbox.data.vo.DeviceVo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 龙 路 飞
 * @CreateDate: 2021-09-18 16:06
 * @Description:
 */
@Data
public class StatsDeviceDto extends StatsDevice {
    /**
     * true = asc,false = desc
     */
    private Boolean turnoverSort;


    /**
     * true = asc,false = desc
     */
    private Boolean consumeSort;
    /**
     * true = asc,false = desc
     */
    private Integer insertCoinTotalSort;
    /**
     * {value: 1 , label : '今天'},
     * {value: 2 , label : '昨天'},
     * {value: 3 , label : '本月'},
     * {value: 4 , label : '上月'},
     * {value: 5 , label : '今年'}
     */
    private Integer dateType;

    private String startYMD;
    private String endYMD;
    private String startDateStr;
    private String endDateStr;

    private Integer storeId;

    private String startTime;
    private String endTime;

    private Integer deviceId;

    private Integer status;

    private Integer consumeRecordTypeId;

    /**
     * 礼品出率
     */
    private BigDecimal giftOutRate;

    private Integer statsType;

    private Boolean sort;

    private int[] consumeRecordTypeIdArray;
    // 普通投币类型
    private int[] insertCoinConsumeRecordTypeIdArray = new int[]{
            ConsumeRecordTypeEnum.CONSUME.getCode()
    };
    // 兑币机出币类型
    private int[] outCoinConsumeRecordTypeIdArray = new int[]{
            ConsumeRecordTypeEnum.COIN_MACHINE.getCode(),
            ConsumeRecordTypeEnum.COIN_MACHINE_VERIFY.getCode(),
            ConsumeRecordTypeEnum.COIN_MACHINE_FETCH_COIN.getCode()
    };
    // 微信核销类型
    private int[] wechatWriteOffTypeIdArray = new int[]{
            ConsumeRecordTypeEnum.COIN_MACHINE_VERIFY.getCode(),
            ConsumeRecordTypeEnum.WEIXIN_SECKILL_VERIFY.getCode(),
            ConsumeRecordTypeEnum.WEIXIN_GROUP_BUYING_VERIFY.getCode(),
            ConsumeRecordTypeEnum.WEIXIN_VOUCHER_VERIFY.getCode()
    };
    /**
     * 格式：41_26_33
     */
    private String merchantStoreIdStr;
    private Boolean isInsertCoin;

    private Integer[] storeIdList;

    private String weixinTypeIdStr;

    /**
     * 今天：0
     * 昨天：1
     * 本周：2
     * 本月：3
     * 上月：5
     * 今年：4
     * 自定义：-1
     */
    private Integer dayType;

    /**
     * 币值
     * */
    private BigDecimal coinPrice;

    /**
     * 一级类型：1.入库单，2.出库，3.调拨，4.退货，5.盘点单
     */
    private Integer firstType;
    /**
     * 二级类型：1.换货出库，2.销售出库，3.手动出库，4.兑换出库，5.撤销回收，
     * 6.设备出礼，7.盘亏出库，8.设备绑定商品，21.手动入库，22.换货入库，
     * 23.盘盈入库，24.销售退款，25.设备绑定商品，41.商品盘点，51.设备绑定商品，61.销售退款，
     */
    private Integer secondaryType;

    private List<DeviceVo> deviceVoList;
}
